<div class="doc-item" id="doc-1144"><h2 class="doc-item-name">pprint-logical-block<span class="namespace">(clojure.contrib.pprint)</span></h2><p class="macro">Macro</p><ul class="var-arglists"><li>(<span class="var-name">pprint-logical-block</span> options* body)</li></ul><div class="var-docstring"><p>Execute the body as a pretty printing logical block with output to *out* which 
must be a pretty printing writer. When used from pprint or cl-format, this can be 
assumed. 

Before the body, the caller can optionally specify options: :prefix, :per-line-prefix, 
and :suffix.</p></div><div class="var-source"><pre>; clojure/contrib/pprint/pprint_base.clj:251
(defmacro pprint-logical-block 
  [&amp; args]
  (let [[options body] (parse-lb-options #{:prefix :per-line-prefix :suffix} args)]
    `(do (if (and *print-level* (&gt;= *current-level* *print-level*)) 
           (.write #^PrettyWriter *out* &quot;#&quot;)
           (binding [*current-level* (inc *current-level*)
                     *current-length* 0] 
             (.startBlock #^PrettyWriter *out*
                          ~(:prefix options) ~(:per-line-prefix options) ~(:suffix options))
             ~@body
             (.endBlock #^PrettyWriter *out*)))
         nil)))</pre></div><div class="license"><p>Copyright (c) Rich Hickey. All rights reserved.</p><p>The use and distribution terms for this software are covered by the <a href="http://opensource.org/licenses/eclipse-1.0.php">Eclipse Public License 1.0</a>, which can be found in the file
          epl-v10.html at the root of this distribution. By using this software
          in any fashion, you are agreeing to be bound by the terms of this
          license. You must not remove this notice, or any other, from this
          software.</p></div></div>